Next | Prev | Up | Top | Contents | Index
Converting a Uniprocessor Driver
As a general approach, you can convert a uniprocessor driver to make it multiprocessor-safe in the following steps:
- If it currently uses the D_OLD flag (or has no pfxdevflag constant), convert it to use the current interface, with a pfxdevflag of 0x00.
- Make sure it works in the original uniprocessor at the current release of IRIX.
- Test it in a multiprocessor running in CPU 0.
- Begin adding semaphores, locks, and other exclusion and synchronization tools. Since the driver still runs serially on CPU 0, it will never wait for a lock, but the coordination between upper half and interrupt handler should work.
- Add the D_MP flag and test on a multiprocessor.
In performing the conversion, you can use calls to spl..() functions as signs that work is needed. These functions are used for mutual exclusion in a uniprocessor, and they are all ineffective or unnecessary in a multiprocessor-safe driver.
Next | Prev | Up | Top | Contents | Index